define cassandra::confs($confpath, $catname) {    

    $main_conf = 'cassandra.yaml'
    $env_conf = 'cassandra-env.sh'
    $topo_conf = 'cassandra-topology.properties'
    $arch_conf = 'commitlog_archiving.properties'
    $log_conf = 'logback.xml'
    $hotcomp_conf = 'hotspot_compiler'

    file { 'main_conf':
	path => "${confpath}/${main_conf}",
        ensure => present,
        content  => template("cassandra/${catname}/${main_conf}.erb");

    	'env_conf':
	path => "${confpath}/${env_conf}",
        ensure => present,
        content  => template("cassandra/${catname}/${env_conf}.erb");

	'topo_conf':
        ensure => present,
        path => "${confpath}/${topo_conf}",
        content  => template("cassandra/${catname}/${topo_conf}.erb");

	'log_conf':
        ensure => present,
        path => "${confpath}/${log_conf}",
        content  => template("cassandra/${catname}/${log_conf}.erb");

        'arch_conf':
        ensure => present,
        path => "${confpath}/${arch_conf}",
        content  => template("cassandra/${catname}/${arch_conf}.erb");

        'hotcomp_conf':
        ensure => present,
        path => "${confpath}/${hotcomp_conf}",
        content  => template("cassandra/${catname}/${hotcomp_conf}.erb");

    }

    $ops_conf = 'address.yaml'
    $opsenv_conf = 'datastax-agent-env.sh'
    $opslog_conf = 'log4j.properties'

    file { 'ops_conf':
        path => "${confpath}/${ops_conf}",
        ensure => present,
        content  => template("cassandra/${ops_conf}.erb");

        'opsenv_conf':
        path => "${confpath}/${opsenv_conf}",
        ensure => present,
        content  => template("cassandra/${opsenv_conf}");

        'opslog_conf':
        ensure => present,
        path => "${confpath}/${opslog_conf}",
        content  => template("cassandra/${opslog_conf}");

    }

}
